<form id="<?php echo $uniqid;?>" method="post">
    <table border="0" width="100%" cellspacing="1" cellpadding="5" class="formtable">
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">会员ID：</td>
            <td width="80%">{{params.member_id}}</td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">姓名：</td>
            <td width="80%"><input type="text" v-model="params.realname"
                                   class="forminput inputstyle validatebox-text textbox-prompt easyui-validatebox"></td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">身份证号：</td>
            <td width="80%"><input type="text" v-model="params.idcard_no"
                                   class="forminput inputstyle validatebox-text textbox-prompt easyui-validatebox"></td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">签约手机号：</td>
            <td width="80%"><input type="number" v-model="params.mobile"
                                   class="forminput inputstyle validatebox-text textbox-prompt easyui-validatebox"></td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">签约地址：</td>
            <td width="80%"><input type="text" style="width: 400px;" v-model="params.address"
                                   class="forminput inputstyle validatebox-text textbox-prompt easyui-validatebox"></td>
            </td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">申请时间：</td>
            <td width="80%"><input type="text" v-model="params.commit_at"
                                   class="forminput inputstyle validatebox-text textbox-prompt easyui-validatebox"></td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">签约时间：</td>
            <td width="80%"><input type="text" v-model="params.signin_at"
                                   class="forminput inputstyle validatebox-text textbox-prompt easyui-validatebox"></td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">解约时间：</td>
            <td width="80%"><input type="text" v-model="params.signout_at"
                                   class="forminput inputstyle validatebox-text textbox-prompt easyui-validatebox"></td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">签约状态：</td>
            <td width="80%">
                <el-radio-group v-model="params.status">
                    <el-radio label="0">未签约</el-radio>
                    <el-radio label="1">待审核</el-radio>
                    <el-radio label="2">已签约</el-radio>
                    <el-radio label="4">已解约</el-radio>
                </el-radio-group>
            </td>
        </tr>
    </table>
</form>

<script>
    $(function () {
        $('#signupsubmit').click(function (data) {
            signupVm.signupupdate();
        })
    });
    var signupVm = new Vue({
        el: '#<?php echo $uniqid;?>',
        data: {
            params: JSON.parse('<?php echo $dataset;?>'),
        },
        created(){
            this.params.status =this.params.status.toString();
        },
        methods: {
            signupupdate: function () {
                $.post('/admin/signup/update', signupVm.params, function (data) {
                    if (parseInt(data.ret) === 0) {
                        $.messager.show({
                            title: '提示',
                            msg: data.msg,
                            timeout: 3000,
                            showType: 'slide'
                        });
                        $('#signupeditfm').form('clear');
                        $("#signupdlg").dialog('close');
                        $("#signup").datagrid('reload');
                    } else {
                        $.messager.alert('提示', data.msg, 'warning');
                    }
                });
            }
        }
    });
</script>